﻿using Loggerz.Repositories.LogRepository;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Loggerz.Interfaces.User;
using Loggerz.Enumerations;
using Loggerz.Classes.LogClass;
using System.Collections.Generic;
using Loggerz.Classes.UserClass;

namespace LoggerzTest
{


    /// <summary>
    ///This is a test class for LogRepositoryBaseTest and is intended
    ///to contain all LogRepositoryBaseTest Unit Tests
    ///</summary>
    [TestClass()]
    public class LogRepositoryBaseTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for LogRepositoryBase Constructor
        ///</summary>
        [TestMethod()]
        public void LogRepositoryBaseConstructorTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = Level.None; // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel);

            Assert.IsTrue(target != null && target.ErrorList != null, "Is Valid");

        }

        /// <summary>
        ///A test for AddError
        ///</summary>
        [TestMethod()]
        public void AddErrorTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = new Level(); // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel); // TODO: Initialize to an appropriate value
            LogBase errorObject = null; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.AddError(errorObject);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ClearErrors
        ///</summary>
        [TestMethod()]
        public void ClearErrorsTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = new Level(); // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.ClearErrors();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetNextSequenceNumber
        ///</summary>
        [TestMethod()]
        public void GetNextSequenceNumberTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = new Level(); // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel); // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.GetNextSequenceNumber();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for HasErrors
        ///</summary>
        [TestMethod()]
        public void HasErrorsTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = new Level(); // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.HasErrors();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

       

        /// <summary>
        ///A test for CurrentError
        ///</summary>
        [TestMethod()]
        public void CurrentErrorTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = new Level(); // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel); // TODO: Initialize to an appropriate value
            LogBase expected = null; // TODO: Initialize to an appropriate value
            LogBase actual;
            target.CurrentError = expected;
            actual = target.CurrentError;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for CurrentUser
        ///</summary>
        [TestMethod()]
        public void CurrentUserTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = new Level(); // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel); // TODO: Initialize to an appropriate value
            IUserBase expected = null; // TODO: Initialize to an appropriate value
            IUserBase actual;
            target.CurrentUser = expected;
            actual = target.CurrentUser;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ErrorLevel
        ///</summary>
        [TestMethod()]
        public void ErrorLevelTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = new Level(); // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel); // TODO: Initialize to an appropriate value
            Level expected = new Level(); // TODO: Initialize to an appropriate value
            Level actual;
            target.ErrorLevel = expected;
            actual = target.ErrorLevel;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ErrorList
        ///</summary>
        [TestMethod()]
        public void ErrorListTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = new Level(); // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel); // TODO: Initialize to an appropriate value
            List<LogBase> expected = null; // TODO: Initialize to an appropriate value
            List<LogBase> actual;
            target.ErrorList = expected;
            actual = target.ErrorList;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for OverrideErrorLevel
        ///</summary>
        [TestMethod()]
        public void OverrideErrorLevelTest()
        {
            IUserBase user = null; // TODO: Initialize to an appropriate value
            Level errorLevel = new Level(); // TODO: Initialize to an appropriate value
            bool overRideErrorLevel = false; // TODO: Initialize to an appropriate value
            LogRepositoryBase target = new LogRepositoryBase(user, errorLevel, overRideErrorLevel); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            target.OverrideErrorLevel = expected;
            actual = target.OverrideErrorLevel;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}
